<%@ page contentType="text/html;charset=utf-8"%>
<%@page import="common.web.action.TreeAction"%>
<%@page import="common.serialization.IWebText"%>
<%@page import="org.apache.commons.lang.StringUtils"%>

<%
	response.setCharacterEncoding("UTF-8");
	response.setHeader("Pragma","No-cache");
	response.setHeader("Cache-Control","no-cache");
	response.setDateHeader("Expires",0);
	response.setContentType("text/xml");

	String tableName = request.getParameter("tableName");
	String pid = request.getParameter("pid");
	IWebText xml = null;
	if(StringUtils.isEmpty(pid)) {
		xml = TreeAction.getTreeData(request);
	} else {
		xml = TreeAction.getTreeDataByPid(request);
	}
	out.println(xml.outWebText());
%>